﻿using MySql.Data.MySqlClient;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace 不动产证管理系统wpf
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }
       
         public Mysqlhelp mysqlhelp = new Mysqlhelp();

        /// <summary>
        /// 查询
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void Thequery(object sender, RoutedEventArgs e)
        {


            if (contencontrol1.Content != null)
            {
                contencontrol1.Content = null;

            }
            contencontrol1.Content = new Page1(mysqlhelp);

        }

        /// <summary>
        /// 入库
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Putinstorage(object sender, RoutedEventArgs e)
        {
            if (contencontrol1.Content != null)
            {
                contencontrol1.Content = null;

            }
            contencontrol1.Content = new Page2();

        }

        private void Grid_Loaded(object sender, RoutedEventArgs e)
        {
            //Debug.Print("点击了查询");

            //MySqlCommand mySqlCommand = new MySqlCommand("select count(*) from test ", mysqlhelp.mySqlConnection);

            //Debug.Print(mySqlCommand.ExecuteScalar().ToString());
        }
    }
}
